#include <iostream>
#include <ciso646>

const int Max = 5;

int main()
{
    using namespace std;

    double fish[Max];
    cout << "Please enter the weights of your fish." << endl
         << "You may enter up to " << Max << " fish. <q to terminate>" << endl;

    cout << "fish #1: ";
    int i = 0;
    while (i < Max and cin >> fish[i])
    {
        if (++i < Max)
            cout << "fish #" << i+1 << ": ";
    }

    double total = 0.0;
    for (auto f: fish)
        total += f;
    
    if (i == 0)
        cout << "No fish" << endl;
    else 
        cout << total / i << " = average weight of " << i << " fish\n";
    
    cout << "Done.\n";
    
    return 0;
}